home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6837 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  39 lines

  1. Newsgroups: comp.lang.c++
  2. Path: howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!cronkite!news
  3. From: Marco DeFreitas <mdefreitas@sikorsky.com>
  4. Subject: A "volatile" class???
  5. Content-Type: text/plain; charset=us-ascii
  6. Message-ID: <1996Feb19.223659.4235@cronkite.res.utc.com>
  7. Sender: news@cronkite.res.utc.com
  8. Nntp-Posting-Host: iris604.asi.sikorsky.com
  9. Content-Transfer-Encoding: 7bit
  10. Organization: Sikorsky Aircraft
  11. Mime-Version: 1.0
  12. Date: Mon, 19 Feb 1996 22:36:59 GMT
  13. X-Mailer: Mozilla 1.1S (X11; I; IRIX 5.3 IP12)
  14. X-Url: news:comp.lang.c++
  15.  
  16. I have several classes that will be "newed" from shared memory.  I assume
  17. that all my data members have to be declared "volatile".  This is getting
  18. messy.  Is there a better way to protect my class from dangerous compiler
  19. optimizations?
  20.  
  21. I've researched some books, and the closest thing I found is a "volatile"
  22. member function.  Information was minimal, but does this mean that all
  23. dangerous optimization for member data is off while in this member function?
  24. Can I leave off the "volatile" keyword for the member data? 
  25.  
  26. Any insights or recommendations would be appreciated.
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. -- 
  34. Regards,
  35. Marco DeFreitas
  36. Sikorsky Aircraft
  37. Stratford, CT
  38.  
  39.